package com.cf.crud.service;

import com.github.pagehelper.Page;
import com.github.pagehelper.PageInfo;

import java.util.List;
import java.util.Map;

public interface BaseService<T> {

    T insert(T bean);

    boolean inserts(List<T> beans);

    int delete(T bean);

    Integer deleteById(long id);

    int update(T bean);

    T selectOne(long id);

    List<T> select(T bean);

    List<T> selectByIds(List<Long> ids);

    Page<T> selectByPage(Integer page, Integer size);

    Page<T> selectByPage(T bean, Integer page, Integer size);

    List<T> selectAll();

    Page<T> selectByExample(Object example, Integer page, Integer size);

    Page<T> commonSearch(Map parameters, Integer page, Integer size);

    List<T> selectByExample(Object example);

    Class getTargetClass();
}
